package net.simflow.swf.analyzer.network.stats.opt;

import net.simflow.swf.analyzer.network.data.Network;
import net.simflow.swf.analyzer.network.stats.data.NetworkStats;

public class NetworkStatsAnalyzer {

	private static NetworkStatsAnalyzer instance = new NetworkStatsAnalyzer();

	private NetworkStatsAnalyzer() {
	}

	public static NetworkStatsAnalyzer getInstance() {
		return instance;
	}

	public NetworkStats analyze(Network network) {
		NetworkStats nstats = new NetworkStats();
		nstats.setNetwork(network);
		nstats.setNetworkName(NetworkBasicAnalyzer.getInstance()
				.analyzeNetworkName(network));
		nstats.setFlowSet(NetworkBasicAnalyzer.getInstance().analyzeFlow(
				network));
		nstats.setServiceSet(NetworkBasicAnalyzer.getInstance().analyzeService(
				network));
		nstats.setNodeSet(NetworkBasicAnalyzer.getInstance().analyzeNode(
				network));
		nstats.setLinkSet(NetworkLinkSetAnalyzer.getInstance().analyze(network));
		nstats.setDegreeDistribution(NetworkDegreeDistributionAnalyzer
				.getInstance().analyze(network));

		return nstats;
	}
}
